473,421 Members | 1,500 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

SWF hangup or Embed?

Hi Bytes -
new to the forum here and purty much a AS3 noobie in general.

I'm working on an mp3 player. Sorta hacking it together from several soucres;
books, tutorials, google etc..

Recently, I've had some success including the Visualization class from www.learningactionscript3.com. It worked great and looked great - that is
when I executed the program inside the IDE. But, when I got to use the
preview function I get mixed results; in flash preview the Visualization works
for a few seconds and then hangs. Leading me to believe I have a problem w/
the timer. But, then preview in HTML shows no reaction at all when displayed.
And of course, when I publish - nothing.

I can not seem to determine if this is a publishing problem and I should use the SWFObject (which I'm sure I should be doing anyways) or it's a problem w/ the code.

Why would it work on execute inside the IDE and not the preview?

Any insights would be appreciated.

http://andy-garber.com/dragPlayer/

tx,
Andy.
Nov 6 '08 #1
14 2402
joedeene
583 512MB
Hello Loafcitious,

I went to the link you provided, and managed to find this .swf file which there seems to be nothing wrong with, all buttons, controls, and everything else is working? And I don't quite get what you're asking except that it's not publishing write? Do any errors or notices pop up?

joedeene
Nov 6 '08 #2
Thanks for taking a loook.
The swf and the html file are both having the same problem.
If you'll notice the line in the middle of the player (two close lines
in are obvious in the swf) it's supposed to jump and move with the
music. That's the Visualization class. What baffles me is that every
thing else in the program is working except the visualization.

Works fine in the IDE upon execution but, hangs or does not work at
all in previews or publishing.
Nov 6 '08 #3
joedeene
583 512MB
Hmm....The two boxes on the bottom right visualize themselves with the music. I notice when I hover my mouse over the lower line of the middle ones it has the hand cursor, which usually signifies a button. Perhaps maybe you accidentally converted the line to a button and not a movie clip and its not functioning properly?

Also, if you have a main tutorial on just that part, let me have the link, so I can work it out and let you know step from step how I'd do it and see if I get the errors still.

joedeene
Nov 6 '08 #4
Jodeene,

Thanks for your help. I'm somewhere between what you said about a movie clip and something my friend said about the security sandbox. Perhaps I'm having a "extends MovieClip" vs "..extends Sprite" issue ? hmmm....three things I need to have a good look at.

The tutorial I've taken the Visualization class from is here:

http://www.learningactionscript3.com/download/9/

The project is in the soundVis folder.

Andy
Nov 7 '08 #5
joedeene
583 512MB
Well try working and troubleshooting each of the three methods you mentioned above and get back to me.

joedeene
Nov 8 '08 #6
Actually, I did find an error w/ the sandbox:

SecurityError: Error #2122: Security sandbox violation: SoundMixer.computeSpectrum: file:///Users/andy/Flash/Actionscript3/dragPlayer/dragPlayer.swf cannot access http://liveaudiomag.com/audio/mp3/nd/couchdemo/cabinMIX.mp3. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.
at flash.media::SoundMixer$/computeSpectrum()
at controls::Visualization/onVisualize()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Nov 8 '08 #7
joedeene
583 512MB
Take a look at this link. I think you have to load a policy file for the flash file because the error occurs often when the flash file is opened in a new tab, such as from firefox. So, here's the code to load a policy file:

Expand|Select|Wrap|Line Numbers
  1. import flash.system.Security;
  2.  public function init():void{
  3. Security.loadPolicyFile(“http://domainname.com/yourpolicy.xml“);
  4. }
Here's the documentation for the loadPolicyFile() method. Reading this documentation page should get your problem resolved.

So, I think the way you're accessing your flash file is requiring permissions and when it opens in a new tab it doesn't have permissions as to what to allow to interact.

joedeene
Nov 8 '08 #8
Hmm...Thanks so much for telling me about this method.
I was just reading about it and thought I had to do it somewhere
in the IDE.

Anyways, I did get the thing to work. Not sure exactly what I did.
Please check to make sure it works for you and it's not just my
personal security settings, that would be great.

I'm gonna look into including this method in the as file.

http://andy-garber.com/dragPlayer/dragPlayer.html

Andy
Nov 8 '08 #9
joedeene
583 512MB
Hmm...Well ya it works, it's visualizing itself with the music, even when you click mute. Great job. Although, I wonder what fixed it, haha even since you aren't sure either :-P

joedeene
Nov 8 '08 #10
Ah ha!
I had changed the playback security option in the publishing.
I had it set to network and changed it back to local files.

I thank you very much again for looking into my problem.
Guess it wasn't so much of a newbie issue after all.
Maybe I've graduated to novice ? lol hahahahah.

maybe not.

Super big tx,
Andy
Nov 8 '08 #11
hmmm... really? The viz stops when I click mute....interesting.
Nov 8 '08 #12
joedeene
583 512MB
hmmm... really? The viz stops when I click mute....interesting.
Is this sarcasm?! :-P just messing. Yes, the visualization does stop but then re-continues after you put the mute back off, All is working fine, I was just saying how some visualizations continue to go even when the mute button is on, but it's better when it stops when the mute is on because really that's what it's visualizing, no sound. So, no more bugs. Everything is good :)

joedeene
Nov 8 '08 #13
haha...no, sadly it was not sarcasm (how's that?).

duh....yeah, just a few minor bugs I have to go back and fix,
and a few more features to add. Things I left behind that were
minor at the time. I have plans to add the song titles dynamically
from the DB. And the song won't "rewind" after it's finished.

But, overall I'm really happy. Thanks for your discussions and
help! I love this website already...bytes has some great peeps!


Andy
Nov 8 '08 #14
joedeene
583 512MB
...But, overall I'm really happy. Thanks for your discussions and
help! I love this website already...bytes has some great peeps!


Andy
Thanks for the feedback, it's always appreciated to here positive feedback :)

I'd also like to send you a friendly reminder to have a thorough look through the Posting Guidelines page

Happy delayed welcome to the bytes community haha :-P
I'll be looking forward to seeing you often in this forum as well as any other forums you may find useful :D

joedeene
Nov 9 '08 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
3
by: Tony Sutton | last post by:
I have this following code in my html file: <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#...
11
by: Anna | last post by:
Hi all. I want to embed the EMBED tag in the object tag. I understood that I need to provide a PARAM tag inside the OBJECT whose value will hold the content of EMBED src attribute, but after...
2
by: François de Dardel | last post by:
Please don't scream that EMBED is evil ! What I am doing is <EMBED SRC="BWV659.mid" AUTOSTART="false" LOOP="TRUE" CONTROLS="SMALLCONSOLE" WIDTH="50" HEIGHT="15" TITLE="BWV 659"> Note the...
4
by: Obi Wan | last post by:
I am running Visual C++ 6 SR5 on a HyperThreaded machine. From time to time the debugger will hangup, forcing a power switch reboot. It does not appear to be related to my application. I...
2
by: Cris Curtis | last post by:
When I use an embed tag that uses a dynamic aspx page, the dynamic aspx page appears to get called 2 times instead. Below is code that adds an embed tag to a placeholder control that will use...
1
by: Andrew Poulos | last post by:
With "normal" SWF HTML there's an EMBED tag nested within an OBJECT tag. How can I check which tag is actually displaying the SWF? I'm using CSS on them and the style on the OBJECT affects the...
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.